<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This file documents the use of the GNU compilers.

Copyright (C) 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>C Extensions (Using the GNU Compiler Collection (GCC))</title>

<meta name="description" content="C Extensions (Using the GNU Compiler Collection (GCC))">
<meta name="keywords" content="C Extensions (Using the GNU Compiler Collection (GCC))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="Indices.html" rel="index" title="Indices">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="Statement-Exprs.html" rel="next" title="Statement Exprs">
<link href="Exception-handling.html" rel="prev" title="Exception handling">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en_US">
<span id="C-Extensions"></span><div class="header">
<p>
Next: <a href="C_002b_002b-Extensions.html" accesskey="n" rel="next">C++ Extensions</a>, Previous: <a href="C_002b_002b-Implementation.html" accesskey="p" rel="prev">C++ Implementation</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<span id="Extensions-to-the-C-Language-Family"></span><h2 class="chapter">6 Extensions to the C Language Family</h2>
<span id="index-extensions_002c-C-language"></span>
<span id="index-C-language-extensions"></span>

<span id="index-pedantic-2"></span>
<p>GNU C provides several language features not found in ISO standard C.
(The <samp>-pedantic</samp> option directs GCC to print a warning message if
any of these features is used.)  To test for the availability of these
features in conditional compilation, check for a predefined macro
<code>__GNUC__</code>, which is always defined under GCC.
</p>
<p>These extensions are available in C and Objective-C.  Most of them are
also available in C++.  See <a href="C_002b_002b-Extensions.html">Extensions to the
C++ Language</a>, for extensions that apply <em>only</em> to C++.
</p>
<p>Some features that are in ISO C99 but not C90 or C++ are also, as
extensions, accepted by GCC in C90 mode and in C++.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="Statement-Exprs.html" accesskey="1">Statement Exprs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Putting statements and declarations inside expressions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Local-Labels.html" accesskey="2">Local Labels</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Labels local to a block.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Labels-as-Values.html" accesskey="3">Labels as Values</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Getting pointers to labels, and computed gotos.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Nested-Functions.html" accesskey="4">Nested Functions</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Nested function in GNU C.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Nonlocal-Gotos.html" accesskey="5">Nonlocal Gotos</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Nonlocal gotos.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Constructing-Calls.html" accesskey="6">Constructing Calls</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Dispatching a call to another function.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Typeof.html" accesskey="7">Typeof</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"><code>typeof</code>: referring to the type of an expression.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Conditionals.html" accesskey="8">Conditionals</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Omitting the middle operand of a &lsquo;<samp>?:</samp>&rsquo; expression.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="_005f_005fint128.html" accesskey="9">__int128</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">128-bit integers&mdash;<code>__int128</code>.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Long-Long.html">Long Long</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Double-word integers&mdash;<code>long long int</code>.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Complex.html">Complex</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Data types for complex numbers.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Floating-Types.html">Floating Types</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Additional Floating Types.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Half_002dPrecision.html">Half-Precision</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Half-Precision Floating Point.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Decimal-Float.html">Decimal Float</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Decimal Floating Types.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Hex-Floats.html">Hex Floats</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Hexadecimal floating-point constants.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Fixed_002dPoint.html">Fixed-Point</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Fixed-Point Types.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Named-Address-Spaces.html">Named Address Spaces</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Named address spaces.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Zero-Length.html">Zero Length</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Zero-length arrays.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Empty-Structures.html">Empty Structures</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Structures with no members.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Variable-Length.html">Variable Length</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Arrays whose length is computed at run time.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Variadic-Macros.html">Variadic Macros</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Macros with a variable number of arguments.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Escaped-Newlines.html">Escaped Newlines</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Slightly looser rules for escaped newlines.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Subscripting.html">Subscripting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Any array can be subscripted, even if not an lvalue.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Pointer-Arith.html">Pointer Arith</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Arithmetic on <code>void</code>-pointers and function pointers.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Variadic-Pointer-Args.html">Variadic Pointer Args</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pointer arguments to variadic functions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Pointers-to-Arrays.html">Pointers to Arrays</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pointers to arrays with qualifiers work as expected.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Initializers.html">Initializers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Non-constant initializers.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Compound-Literals.html">Compound Literals</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Compound literals give structures, unions
                        or arrays as values.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Designated-Inits.html">Designated Inits</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Labeling elements of initializers.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Case-Ranges.html">Case Ranges</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&lsquo;case 1 ... 9&rsquo; and such.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Cast-to-Union.html">Cast to Union</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Casting to union type from any member of the union.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Mixed-Labels-and-Declarations.html">Mixed Labels and Declarations</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Mixing declarations, labels and code.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Function-Attributes.html">Function Attributes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Declaring that functions have no side effects,
                        or that they can never return.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Variable-Attributes.html">Variable Attributes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying attributes of variables.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Type-Attributes.html">Type Attributes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying attributes of types.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Label-Attributes.html">Label Attributes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying attributes on labels.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Enumerator-Attributes.html">Enumerator Attributes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying attributes on enumerators.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Statement-Attributes.html">Statement Attributes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying attributes on statements.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Attribute-Syntax.html">Attribute Syntax</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Formal syntax for attributes.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Function-Prototypes.html">Function Prototypes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Prototype declarations and old-style definitions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="C_002b_002b-Comments.html">C++ Comments</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">C++ comments are recognized.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Dollar-Signs.html">Dollar Signs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Dollar sign is allowed in identifiers.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Character-Escapes.html">Character Escapes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">&lsquo;<samp>\e</samp>&rsquo; stands for the character <tt class="key">ESC</tt>.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Alignment.html">Alignment</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Determining the alignment of a function, type or variable.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Inline.html">Inline</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Defining inline functions (as fast as macros).
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Volatiles.html">Volatiles</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">What constitutes an access to a volatile object.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Using-Assembly-Language-with-C.html">Using Assembly Language with C</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Instructions and extensions for interfacing C with assembler.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Alternate-Keywords.html">Alternate Keywords</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"><code>__const__</code>, <code>__asm__</code>, etc., for header files.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Incomplete-Enums.html">Incomplete Enums</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"><code>enum foo;</code>, with details to follow.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Function-Names.html">Function Names</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Printable strings which are the name of the current
                        function.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Return-Address.html">Return Address</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Getting the return or frame address of a function.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Vector-Extensions.html">Vector Extensions</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Using vector instructions through built-in functions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Offsetof.html">Offsetof</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Special syntax for implementing <code>offsetof</code>.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="_005f_005fsync-Builtins.html">__sync Builtins</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Legacy built-in functions for atomic memory access.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="_005f_005fatomic-Builtins.html">__atomic Builtins</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Atomic built-in functions with memory model.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Integer-Overflow-Builtins.html">Integer Overflow Builtins</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Built-in functions to perform arithmetics and
                        arithmetic overflow checking.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="x86-specific-memory-model-extensions-for-transactional-memory.html">x86 specific memory model extensions for transactional memory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">x86 memory models.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Object-Size-Checking.html">Object Size Checking</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Built-in functions for limited buffer overflow
                        checking.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Other-Builtins.html">Other Builtins</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Other built-in functions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Target-Builtins.html">Target Builtins</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Built-in functions specific to particular targets.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Target-Format-Checks.html">Target Format Checks</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Format checks specific to particular targets.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Pragmas.html">Pragmas</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Pragmas accepted by GCC.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Unnamed-Fields.html">Unnamed Fields</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Unnamed struct/union fields within structs/unions.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Thread_002dLocal.html">Thread-Local</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Per-thread variables.
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Binary-constants.html">Binary constants</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Binary constants using the &lsquo;<samp>0b</samp>&rsquo; prefix.
</td></tr>
</table>

<hr>
<div class="header">
<p>
Next: <a href="C_002b_002b-Extensions.html" accesskey="n" rel="next">C++ Extensions</a>, Previous: <a href="C_002b_002b-Implementation.html" accesskey="p" rel="prev">C++ Implementation</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indices.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
